<template>
  <div class="company-list-1">
    <div class="header">
      <div class="prefix"></div>
      <div class="header-title">精准巡查概览</div>
    </div>
    <div class="content">
      <div class="content-item1 bg-green">
        <div class="content-item1-title">告警核实通过率</div>
        <div class="content-item1-value">
          {{ info?.passRate || '0' }} <span class="small">%</span>
        </div>
      </div>
      <div class="content-item1 bg-blue">
        <div class="content-item1-title">平均核实耗时</div>
        <div class="content-item1-value">
          {{ info?.avgTime || '0' }}<span class="small">min</span>
        </div>
      </div>
      <div class="content-item1 bg-orange">
        <div class="content-item1-title">平均巡查时间</div>
        <div class="content-item1-value">
          {{ info?.avgCheckTime || '0' }}<span class="small">min</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, onUnmounted, defineProps } from 'vue'

const { info } = defineProps({
  info: Object
})
</script>

<style scoped lang="scss">
@import '@/assets/table.css';

.company-list-1 {
  padding: 10px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 16px;

  .header {
    width: 350px;
    height: 50px;
    display: flex;
    align-items: center;
    padding-left: 20px;

    .prefix {
      width: 8px;
      height: 15px;
      background-color: #31a7ff;
    }

    .header-title {
      padding-left: 10px;
    }
  }

  .content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;

    &-item1 {
      width: 150px;
      height: 150px;
      background-position: center, center;
      background-repeat: no-repeat, no-repeat;
      background-size: cover, cover;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;

      &-title {
        line-height: 30px;
      }

      &-value {
        font-weight: bold;
        font-size: 24px;

        .small {
          font-size: 12px;
        }
      }
    }

    .bg-green {
      background-image: url('@/assets/green1.svg'), url('@/assets/green2.svg');
    }

    .bg-blue {
      background-image: url('@/assets/blue1.svg'), url('@/assets/blue2.svg');
    }

    .bg-orange {
      background-image: url('@/assets/orange1.svg'), url('@/assets/orange2.svg');
    }
  }
}
</style>
